package com.lagou.server.impl;

import com.lagou.ApiService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class ApiServiceImpl implements ApiService {
    @Override
    public String methodA() {
        Random random = new Random();
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Run methodA!");
        return "This id methodA.";
    }

    @Override
    public String methodB() {
        Random random = new Random();
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Run methodB!");
        return "This id methodB.";
    }

    @Override
    public String methodC() {
        Random random = new Random();
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Run methodC!");
        return "This id methodC.";
    }
}
